package cn.darxs.noquestion.service.Impl;

import cn.darxs.noquestion.entity.Question;
import cn.darxs.noquestion.mapper.QuestionMapper;
import cn.darxs.noquestion.service.QuestionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class QuestionServiceImpl extends ServiceImpl<QuestionMapper,Question> implements QuestionService {
    @Autowired
    private QuestionMapper qm;

    public List<Question> findAll(){
        return qm.findAll();
    }

    public boolean delete(Integer id){
        qm.delete(id);
        return true;
    }

    public boolean update(Question question){
        qm.update(question);
        return true;
    }
}
